package com.hs.sfzy.mapper;

import com.hs.sfzy.entity.ClassAnswer;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface ClassAnswerMapper {
    //根据问题id查询所有回答
    List<ClassAnswer> getClassAnswerByQuestionId(Integer questionId);
    //根据用户id查询用户所有回答
    List<ClassAnswer> getClassAnswerByUserId(Integer userId);
    //添加回答
    Integer addClassAnswer(ClassAnswer classAnswer);
    //根据问题id查询回答数量
    Integer getClassAnswerCountByQuestionId(Integer questionId);
}
